#pragma once
//#include "bean/User.h"
#include <map>
#include <list>
#include <mutex>   
#include <string>
using namespace std;

class CinUserMap
{

private:
    CinUserMap();
     ~CinUserMap(void);
public:
    static CinUserMap* GetInstance();
    void addMap(int, string);
    void addClient(int, long);
    void removeMap(int);
    string findUser(int);
    int findUserByUid(string);
    long findFdTime(int);
    std::list<int> getClients();
    void updateClients(int key, long time);
     
private:
   std::map<int, string> mUserMap;
   static CinUserMap* mInstance;
   std::mutex mtx;
    // 存放客户端socket描述符的MAP
   std::map<int, long> clients;

   std::map<int, char> mcanData;
   std::map<int, string> mUserMap;

};